package com.ycxy.sh.transaction.service;

import com.ycxy.sh.transaction.dao.entity.News;
import com.ycxy.sh.transaction.dao.vo.LayuiPageVo;
import com.ycxy.sh.transaction.mapper.NewsMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hlt
 * @since 2019-12-21
 */
@Service
@Transactional
public interface NewsService {

    /**发布公告*/
    void insertNews(News news, HttpSession session);
    /**删除公告*/
    void delectNews(Long newsId,HttpSession session);

    /**根据传入的公告id修改公告内容*/
    void updateNews(News news);

    /**查看公告详情*/
    News queryNewsById(Long newsId);

    /**查询前三条公告*/
    List<News> queryNews();

    /**
     * 后台分页查看公告列表
     * @param limit
     * @param page
     * @return
     */
    LayuiPageVo selectListNews(int limit, int page);

    /**
     * 分页首页网站公告
     * @param page
     */
    List<News> selectHomePage(Integer page);

}
